package com.yjd.bi.user.service;

import com.yjd.comm.base.service.IBaseService;
import com.yjd.bi.report.enums.TimeType;
import com.yjd.bi.report.model.EChartsModel;
import com.yjd.bi.user.model.BasicDataWapModel;

/**
 * <b>description</b>：wap基础数据业务接口<br>
 * <b>time</b>：2016-06-06 15:18:11 <br>
 * <b>author</b>：  zhoujin@yijiedai.com
 */
public interface IBasicDataWapService extends IBaseService {
	/**
	 * 插入
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public BasicDataWapModel insert(BasicDataWapModel model) throws Exception;

	/**
	 * 更新,大于等于1表示成功，其他失败
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public int update(BasicDataWapModel model) throws Exception;

	/**
	 * 根据id删除,大于等于1表示成功，其他失败
	 * 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int delete(long id) throws Exception;
	
	/**
	 * 统计
	 * 
	 * @param timeType
	 * @param timeFrom
	 * @param field
	 * @return
	 * @throws Exception
	 *             EChartsModel
	 */
	public EChartsModel getDates(Integer type,TimeType timeType, Long timeFrom, String field)
			throws Exception;

	/**
	 * 统计
	 * @param field 字段名
	 * @param start
	 * @param end
	 * @param type 统计类型
	 * @return
	 * @throws Exception
	 */
	public double getFundsSum(String field,String start, String end,String type)throws Exception;
}
